package org.tong.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.tong.service.inter.EchoService;

@RestController
public class EchoController {

    @DubboReference(version = "1.0.0")
    public EchoService echoService;

    @RequestMapping("/echo/{name}")
    public String echo(@PathVariable("name") String name) {
        return echoService.echo(name);
    }
}
